$(document).ready(function(){
		$("a").click(function(event){
		 alert("As you can see, the link no longer took you to jquery.com");
		 event.preventDefault();
		});
		$(document).keyup(function(){
		 alert("keyup");
			addSquare();
		});
});

function addSquare()
{
	var square = document.createElement("DIV");
	square.setAttribute("class", "square");
	document.body.appendChild(square);
}

$(function() {
	$( ".square" ).draggable();
});
